import request from '@/utils/request'
// =========================================================渠道
// 获取渠道列表
export function getlistTable1(data) {
  return request({
    url: '/report/activityStatistics',
    method: 'post',
    data
  })
}
// 渠道图1

export function getchannelspie(params) {
  return request({
    url: '/report/activityTypePie',
    method: 'get',
    params
  })
}





// ，图2


// ===============================================================客户
// 查询客户表搜索表详细信息                       0k
export function getGenTable(data) {
  return request({
    url: "/statistics//search/client",
    method: 'post',
    data
  })
}

// 新增用户图表                                      ok
export function getUserChart(data) {
  return request({
    url: '/statistics//client/new',
    method: 'post',
    data
  })
}

// 学科客户分布图表                                     ok
export function getdisciplineChart(data) {
  return request({
    url: '/statistics/client/subject',
    method: 'post',
    data
  })
}

// 预览生成代码====================================================销售
export function getSaleslist(params) {
  return request({
    url: '/report/salesStatistics',
    params
  })
}

// 搜索渠道
export function getchannel(data) {                         //ok
  return request({
    url: '/report/channelStatistics',
    method: 'post',
    data
  })
}

// 搜索部门
export function getdepartment(data) {                  //ok
  return request({
    url: '/report/deptStatistics' ,
    method: 'post',
    data
  })
}

// 搜索归属人
export function getascription(data) {
  return request({
    url: '/report/ownerShipStatistics' ,
    method: 'post',
    data
  })
}
// ===============================================================//线索
// 生成代码（自定义路径）
export function getCluelist(data) {
  return request({
    url: "/statistics/search/clue",
    method: 'post',
    data
  })
}

// 新增线索图表                                      ok
export function getcluenew(data) {
  return request({
    url: '/statistics/clue/new',
    method: 'post',
    data
  })
}

// 线索转化率                                     ok
export function getclueconversion(data) {
  return request({
    url: '/statistics/clue/conversion',
    method: 'post',
    data
  })
}
